home *** CD-ROM | disk | FTP | other *** search
/ Champak 138 / Volume 138 Aug 19 2011 - Damaged.iso / Games / star-rebellion.swf / scripts / MochiBot.as < prev    next >
Text File  |  2011-08-19  |  2KB  |  60 lines

  1. package
  2. {
  3.    import flash.display.Loader;
  4.    import flash.display.Sprite;
  5.    import flash.net.URLRequest;
  6.    import flash.net.URLRequestMethod;
  7.    import flash.net.URLVariables;
  8.    import flash.system.Capabilities;
  9.    import flash.system.Security;
  10.    
  11.    public dynamic class MochiBot extends Sprite
  12.    {
  13.        
  14.       
  15.       public function MochiBot()
  16.       {
  17.          super();
  18.       }
  19.       
  20.       public static function track(param1:Sprite, param2:String) : MochiBot
  21.       {
  22.          var _loc3_:MochiBot = null;
  23.          var _loc4_:String = null;
  24.          var _loc5_:URLVariables = null;
  25.          var _loc6_:String = null;
  26.          var _loc7_:URLRequest = null;
  27.          var _loc8_:Loader = null;
  28.          if(Security.sandboxType == "localWithFile")
  29.          {
  30.             return null;
  31.          }
  32.          _loc3_ = new MochiBot();
  33.          param1.addChild(_loc3_);
  34.          Security.allowDomain("*");
  35.          Security.allowInsecureDomain("*");
  36.          _loc4_ = "http://core.mochibot.com/my/core.swf";
  37.          (_loc5_ = new URLVariables())["sb"] = Security.sandboxType;
  38.          _loc5_["v"] = Capabilities.version;
  39.          _loc5_["swfid"] = param2;
  40.          _loc5_["mv"] = "8";
  41.          _loc5_["fv"] = "9";
  42.          if((_loc6_ = param1.loaderInfo.url).indexOf("http") == 0)
  43.          {
  44.             _loc5_["url"] = _loc6_;
  45.          }
  46.          else
  47.          {
  48.             _loc5_["url"] = "local";
  49.          }
  50.          (_loc7_ = new URLRequest(_loc4_)).contentType = "application/x-www-form-urlencoded";
  51.          _loc7_.method = URLRequestMethod.POST;
  52.          _loc7_.data = _loc5_;
  53.          _loc8_ = new Loader();
  54.          _loc3_.addChild(_loc8_);
  55.          _loc8_.load(_loc7_);
  56.          return _loc3_;
  57.       }
  58.    }
  59. }
  60.